package com.andy.beef.app.room

import androidx.room.*
import com.andy.module.bean.CodeBean


/**
 * @creator:LuoFan
 * @date:2022/6/30
 * @description:
 */
@Dao
interface CodeDao {

    @Query("select * from ${CodeBean.TABLE_NAME} where groupKey=:groupKey")
    fun getListByGroup(groupKey: String): List<CodeBean>

    @Insert
    fun insert(bean: CodeBean)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertList(list: List<CodeBean>)

    @Update
    fun update(bean: CodeBean): Int
}